package com.hwua.client;

import android.app.Activity;
import android.content.Intent;
import android.view.View;

/**
 * Created by Administrator on 2017/6/3 0003.
 * 公用监听器，用于返回主界面
 */
public class HomeListener implements View.OnClickListener {
    //用于存放传入过来的activity
    private Activity activity;

    //构造方法
    public HomeListener(Activity activity) {
        this.activity=activity;
    }

    @Override
    public void onClick(View source){
        //创建一个意图对象
        Intent intent =new Intent(activity,AuctionClientActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

        activity.startActivity(intent);//跳转到主界面
    }
}
